﻿@model Company
<form class="form-horizontal uiform" method="post"
      data-modal="true"
      data-table=".uitable"
      data-error-el=".alert-danger"
      data-on-submit-success="fx.mtfSuccess"
      action="@Url.Action("Save")">
    <div class="modal-header">
        <button class="close" data-dismiss="modal" type="button" aria-label="Close">
            <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">@Html.EditStatus("企业信息")</h4>
    </div>
    <div class="modal-body">
        @Html.AntiForgeryToken()
        @Html.MarkCreate()
        @Html.HiddenFor(p => p.Id)
        @Html.HiddenFor(p => p.CreateDateTime)
        <div class="alert alert-danger fxhide"></div>
        <div class="form-group">
            <label class="control-label col-md-3">
                <span class="required"> * </span>
                企业名称：
            </label>
            <div class="col-md-8">
                <input class="form-control" name="@nameof(Model.Name)" value="@Model.Name"
                       data-validate="required: true,maxlength: 20"
                       data-validate-message="required:'请输入企业名称'"
                       type="text" autocomplete="off" />
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-3">
                联系人：
            </label>
            <div class="col-md-8">
                <input class="form-control" name="@nameof(Model.LinkMan)" value="@Model.LinkMan"
                       data-validate="maxlength: 10"
                       type="text" autocomplete="off" />
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-3">
                联系电话：
            </label>
            <div class="col-md-8">
                <input class="form-control" name="@nameof(Model.TelPhone)" value="@Model.TelPhone"
                       data-validate="minlength: 8,maxlength: 11,digits:true"
                       type="text" autocomplete="off" />
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-3">
                手机号码：
            </label>
            <div class="col-md-8">
                <input class="form-control" name="@nameof(Model.MobilePhone)" value="@Model.MobilePhone"
                       data-validate="maxlength: 11,number:true"
                       type="text" autocomplete="off" />
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-3">
                传真：
            </label>
            <div class="col-md-8">
                <input class="form-control" name="@nameof(Model.Fax)" value="@Model.Fax"
                       data-validate="maxlength: 11,number:true"
                       type="text" autocomplete="off" />
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-3">
                地址：
            </label>
            <div class="col-md-8">
                <input class="form-control" name="@nameof(Model.Address)" value="@Model.Address"
                       data-validate="maxlength: 50"
                       type="text" autocomplete="off"/>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-3">
                状态：
            </label>
            <div class="col-md-8">
                <input class="uiswitch" name="@nameof(Model.IsEnabled)"
                       data-on-text="启用" data-off-text="禁用" data-size="small"
                       type="checkbox" @Html.IsChecked(Model.IsEnabled)>

            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-3">
                备注：
            </label>
            <div class="col-md-8">
                <textarea class="form-control" name="@nameof(Model.Note)" rows="3" data-validate="maxlength: 100">@Model.Note</textarea>
            </div>
        </div>
    </div>
    <div class="modal-footer">
        <button class="btn btn-primary" type="submit">
            <i class="fa fa-save"></i> 保存
        </button>
        <button class="btn btn-default" type="button" data-dismiss="modal">
            <i class="fa fa-sign-in"></i> 关闭
        </button>
    </div>
</form>